code with naval pattern part 2